package com.cloud.demo2020;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hystrix")
public class HystrixController {

    @RequestMapping("/infoOk")
    public String infoOk() {
        return "线程池:  "+Thread.currentThread().getName()+" Info_OK," + "O(∩_∩)O哈哈~";
    }

    @RequestMapping("/infoOk2")
    public String infoOk2() {
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "线程池:  "+Thread.currentThread().getName()+" Info_OK2," + "O(∩_∩)O哈哈~";
    }
}
